# ##########################################
SET( INCLUDE_FILES
	Include/Application.hpp
	Include/Joystick.hpp
)


# ##########################################
SET( SOURCE_FILES
	Source/Main.cpp
	Source/Application.cpp
	Source/Joystick.cpp
)


# ##########################################
# Let's make things pretty in IDE's.
SOURCE_GROUP( "Includes" FILES ${INCLUDE_FILES} )
SOURCE_GROUP( "Source" FILES ${SOURCE_FILES} )


# ##########################################
FIND_PACKAGE( OpenGL REQUIRED )


# ##########################################
IF( WIN32 )
	SET( EXETYPE WIN32 )
ENDIF()


# ##########################################

ADD_EXECUTABLE( XO ${EXETYPE}
	${INCLUDE_FILES}
	${SOURCE_FILES}
)
TARGET_INCLUDE_DIRECTORIES( XO
	PUBLIC ${CMAKE_CURRENT_LIST_DIR}/Include
)
TARGET_LINK_LIBRARIES( XO
	Math-SIMD
	$<$<BOOL:${WIN32}>:sfml-main>
	sfml-window
	sfml-system
	sfml-graphics
	sfml-audio
	Config
	${OPENGL_LIBRARIES}
	RocketCore
	RocketControls
	Application
	$<$<BOOL:ENABLE_DEVBUILD>:TweakUtils>
	$<$<BOOL:ENABLE_DEVBUILD>:RocketDebugger>
	UI
	physfs-static
)


# ##########################################
# Group the applications.
SET_PROPERTY( TARGET XO PROPERTY FOLDER Applications/Games )
